package com.imooc.town.service;

import com.imooc.town.dataobject.ProductInfo;
import com.imooc.town.dto.CartDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.stream.LongStream;

/**
 * Created by 10077 on 2018/3/21.
 * desc:
 */
public interface ProductService {

    ProductInfo getOne(String productId);
    List<ProductInfo> findUpAll();
    Page<ProductInfo> findAll(Pageable pageable);
    ProductInfo save(ProductInfo productInfo);
//     加库存
    void increateStock(List<CartDTO> cartDTOList);
//      减库存
    void decreaseStock(List<CartDTO> cartDTOList);
}
